from django.shortcuts import render
from django.http import HttpResponse
from page.models import Article
from markdown import markdown

# Create your views here.
def hello(request):
    return HttpResponse('hello world')
def index(request):
	data = Article.objects.all()
	for x in data:
		x.article_message = markdown(x.article_message)[0:200]
	context = {'data':data}
	return  render(request,'index.html',context)